.class public Lcom/example/m6wmr/AddCouponActivity;
.super Landroid/app/Activity;
.source "AddCouponActivity.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/example/m6wmr/AddCouponActivity$mOnclistener;
    }
.end annotation


# instance fields
.field private activities:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/app/Activity;",
            ">;"
        }
    .end annotation
.end field

.field private closebtn:Landroid/widget/LinearLayout;

.field private contentValues:Landroid/content/ContentValues;

.field private context:Landroid/content/Context;

.field private couponNumber:Ljava/lang/String;

.field private couponcode:Ljava/lang/String;

.field private cursor:Landroid/database/Cursor;

.field private db:Landroid/database/sqlite/SQLiteDatabase;

.field private et_coupon_code:Landroid/widget/EditText;

.field private et_coupon_number:Landroid/widget/EditText;

.field private h:Landroid/os/Handler;

.field private m:Lmyapp/MyApp;

.field private openHelper:Ldbclass/DBOpenHelper;

.field private result:Ljava/lang/String;

.field private tv_sure_commit:Landroid/widget/TextView;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 34
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method

.method static synthetic access$0(Lcom/example/m6wmr/AddCouponActivity;)Landroid/os/Handler;
    .locals 1

    .prologue
    .line 46
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->h:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$1(Lcom/example/m6wmr/AddCouponActivity;)Landroid/widget/EditText;
    .locals 1

    .prologue
    .line 49
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->et_coupon_number:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$10(Lcom/example/m6wmr/AddCouponActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 56
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->result:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$2(Lcom/example/m6wmr/AddCouponActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 53
    iput-object p1, p0, Lcom/example/m6wmr/AddCouponActivity;->couponNumber:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$3(Lcom/example/m6wmr/AddCouponActivity;)Landroid/widget/EditText;
    .locals 1

    .prologue
    .line 50
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->et_coupon_code:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$4(Lcom/example/m6wmr/AddCouponActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 54
    iput-object p1, p0, Lcom/example/m6wmr/AddCouponActivity;->couponcode:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$5(Lcom/example/m6wmr/AddCouponActivity;)Landroid/content/Context;
    .locals 1

    .prologue
    .line 43
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->context:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$6(Lcom/example/m6wmr/AddCouponActivity;)Lmyapp/MyApp;
    .locals 1

    .prologue
    .line 36
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->m:Lmyapp/MyApp;

    return-object v0
.end method

.method static synthetic access$7(Lcom/example/m6wmr/AddCouponActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 53
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->couponNumber:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$8(Lcom/example/m6wmr/AddCouponActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 54
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->couponcode:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$9(Lcom/example/m6wmr/AddCouponActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 56
    iput-object p1, p0, Lcom/example/m6wmr/AddCouponActivity;->result:Ljava/lang/String;

    return-void
.end method

.method private initData()V
    .locals 2

    .prologue
    .line 229
    invoke-virtual {p0}, Lcom/example/m6wmr/AddCouponActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Lmyapp/MyApp;

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->m:Lmyapp/MyApp;

    .line 230
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v0}, Lmyapp/MyApp;->getActivity()Ljava/util/ArrayList;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->activities:Ljava/util/ArrayList;

    .line 231
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->activities:Ljava/util/ArrayList;

    invoke-virtual {v0, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 232
    iput-object p0, p0, Lcom/example/m6wmr/AddCouponActivity;->context:Landroid/content/Context;

    .line 234
    new-instance v0, Ldbclass/DBOpenHelper;

    iget-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->context:Landroid/content/Context;

    invoke-direct {v0, v1}, Ldbclass/DBOpenHelper;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->openHelper:Ldbclass/DBOpenHelper;

    .line 235
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->contentValues:Landroid/content/ContentValues;

    .line 236
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->openHelper:Ldbclass/DBOpenHelper;

    invoke-virtual {v0}, Ldbclass/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 237
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->openHelper:Ldbclass/DBOpenHelper;

    invoke-virtual {v0}, Ldbclass/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 240
    return-void
.end method

.method private initView()V
    .locals 1

    .prologue
    .line 206
    const v0, 0x7f0c0001

    invoke-virtual {p0, v0}, Lcom/example/m6wmr/AddCouponActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->closebtn:Landroid/widget/LinearLayout;

    .line 207
    const v0, 0x7f0c000c

    invoke-virtual {p0, v0}, Lcom/example/m6wmr/AddCouponActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->et_coupon_number:Landroid/widget/EditText;

    .line 208
    const v0, 0x7f0c000d

    invoke-virtual {p0, v0}, Lcom/example/m6wmr/AddCouponActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->et_coupon_code:Landroid/widget/EditText;

    .line 209
    const v0, 0x7f0c000e

    invoke-virtual {p0, v0}, Lcom/example/m6wmr/AddCouponActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->tv_sure_commit:Landroid/widget/TextView;

    .line 211
    return-void
.end method

.method private onClickListener()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 218
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->closebtn:Landroid/widget/LinearLayout;

    new-instance v1, Lcom/example/m6wmr/AddCouponActivity$mOnclistener;

    invoke-direct {v1, p0, v2}, Lcom/example/m6wmr/AddCouponActivity$mOnclistener;-><init>(Lcom/example/m6wmr/AddCouponActivity;Lcom/example/m6wmr/AddCouponActivity$mOnclistener;)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 219
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->tv_sure_commit:Landroid/widget/TextView;

    new-instance v1, Lcom/example/m6wmr/AddCouponActivity$mOnclistener;

    invoke-direct {v1, p0, v2}, Lcom/example/m6wmr/AddCouponActivity$mOnclistener;-><init>(Lcom/example/m6wmr/AddCouponActivity;Lcom/example/m6wmr/AddCouponActivity$mOnclistener;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 222
    return-void
.end method


# virtual methods
.method protected isNull()Z
    .locals 3

    .prologue
    const/4 v0, 0x0

    .line 157
    iget-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->couponNumber:Ljava/lang/String;

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 162
    iget-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->context:Landroid/content/Context;

    const-string v2, "\u4f18\u60e0\u5238\u5361\u53f7\u4e3a\u7a7a"

    invoke-static {v1, v2, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    .line 174
    :goto_0
    return v0

    .line 166
    :cond_0
    iget-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->couponcode:Ljava/lang/String;

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    .line 169
    iget-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->context:Landroid/content/Context;

    const-string v2, "\u4f18\u60e0\u5238\u5bc6\u7801\u4e3a\u7a7a"

    invoke-static {v1, v2, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/Toast;->show()V

    goto :goto_0

    .line 174
    :cond_1
    const/4 v0, 0x1

    goto :goto_0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 61
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 62
    const v1, 0x7f030003

    invoke-virtual {p0, v1}, Lcom/example/m6wmr/AddCouponActivity;->setContentView(I)V

    .line 64
    invoke-direct {p0}, Lcom/example/m6wmr/AddCouponActivity;->initData()V

    .line 66
    invoke-direct {p0}, Lcom/example/m6wmr/AddCouponActivity;->initView()V

    .line 68
    invoke-direct {p0}, Lcom/example/m6wmr/AddCouponActivity;->onClickListener()V

    .line 69
    invoke-virtual {p0}, Lcom/example/m6wmr/AddCouponActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    check-cast v1, Lmyapp/MyApp;

    iput-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->m:Lmyapp/MyApp;

    .line 70
    const/high16 v1, 0x7f0c0000

    invoke-virtual {p0, v1}, Lcom/example/m6wmr/AddCouponActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    .line 71
    .local v0, "top":Landroid/widget/LinearLayout;
    iget-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v1}, Lmyapp/MyApp;->getAppcolor()Ljava/lang/String;

    move-result-object v1

    const-string v2, "1"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 72
    const v1, 0x7f070026

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    .line 73
    iget-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->tv_sure_commit:Landroid/widget/TextView;

    const v2, 0x7f020020

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setBackgroundResource(I)V

    .line 77
    :cond_0
    new-instance v1, Lcom/example/m6wmr/AddCouponActivity$1;

    invoke-direct {v1, p0}, Lcom/example/m6wmr/AddCouponActivity$1;-><init>(Lcom/example/m6wmr/AddCouponActivity;)V

    iput-object v1, p0, Lcom/example/m6wmr/AddCouponActivity;->h:Landroid/os/Handler;

    .line 150
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 257
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 258
    iget-object v0, p0, Lcom/example/m6wmr/AddCouponActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 261
    return-void
.end method

.method protected onStart()V
    .locals 0

    .prologue
    .line 246
    invoke-super {p0}, Landroid/app/Activity;->onStart()V

    .line 250
    return-void
.end method
